package com.cskaoyan.service;

import com.cskaoyan.bean.MarketBrand;
import com.cskaoyan.mapper.MarketBrandMapper;
import com.cskaoyan.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

public class BrandServiceImpl implements BrandService {
    @Override
    public MarketBrand findById(Integer id) {
        SqlSession sqlSession = MyBatisUtil.getSqlSession();
        MarketBrandMapper mapper = sqlSession.getMapper(MarketBrandMapper.class);
        MarketBrand marketBrand = mapper.selectByPrimaryKey(id);
        sqlSession.close();
        return marketBrand;
    }
}